home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 2
/
CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso
/
magazine
/
amiga_e
/
ee
/
rexx
/
insertfile.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-09-03
|
553b
|
33 lines
/**/
OPTIONS RESULTS
OPTIONS FAILAT 10
PARSE ARG filename
IF filename="" THEN
DO
SAY 'USAGE: INSERTFILE filename'
RETURN
END
ADDRESS 'EE.0'
LockWindow
?InsertMode; insertState=RESULT
IF insertState THEN InsertMode
?JustifyNewline; justifyState=RESULT
IF justifyState THEN JustifyNewline
IF Open(inputFile, filename, 'R') THEN DO UNTIL eof
inputLine=Readln(inputFile)
eof=Eof(inputfile)
IF eof=0 THEN PutLine inputline
END
ELSE SAY 'Could not open file.'
IF insertState THEN InsertMode
IF justifyState THEN JustifyNewline
UnlockWindow